package neuralNetworks;

import java.io.Serializable;
import java.util.ArrayList;

public class Layer<T extends Neuron> implements Serializable {
	private static final long serialVersionUID = 1455319579430317593L;

	public ArrayList<T> neurons = new ArrayList<T>();

	public Layer() {

	}

	public Layer(Layer<T> layer, NeuronFactory<T> neuronFactory) throws InstantiationException, IllegalAccessException {
		for (T neuron : layer.neurons) {
			neurons.add(neuronFactory.copy(neuron));
		}
	}
}